home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 5 / MAZE__ / CMAZEPAN.H < prev    next >
Text File  |  1991-12-29  |  1KB  |  52 lines

  1. /****
  2.  * CMazePane.h
  3.  *
  4.  *    Pane class for a typical application.
  5.  *
  6.  ****/
  7.  
  8. #define _H_CMazePane            /* Include this file only once */
  9. #include <CPanorama.h>
  10.  
  11. struct CMazePane : CPanorama {
  12.  
  13.     Handle      MazeHandle;
  14.     char        *MazeDat;
  15.     int            MazeRows;
  16.     int            MazeCols;
  17.     int            RowSize;
  18.     
  19.                                     /** Contruction/Destruction **/
  20.     void        IMazePane(CView *anEnclosure, CBureaucrat *aSupervisor,
  21.                             short aWidth, short aHeight,
  22.                             short aHEncl, short aVEncl,
  23.                             SizingOption aHSizing, SizingOption aVSizing);
  24.                             
  25.     void        SetMazeRows( int rows );
  26.     void        SetMazeCols( int cols );
  27.     void        SetRowSize( int rowSize );
  28.     void        SetMazeDat( char *dat);
  29.     void        SetMazeHandle( Handle );
  30.  
  31.                                     /** Drawing **/
  32.     void        Draw(Rect *area);
  33.     int            rnd(int low, int hi);
  34.     void        setSquare(int row, int col, char val);
  35.     char         getSquare(int row, int col);
  36.     int            legalPath(int row, int col, int dir);
  37.     int            randomDir(void);
  38.     int            power(int base, int n);
  39.     void        buildPath(int row, int col, int dir);
  40.     void        CreateMaze(void);
  41.  
  42.                                     /** Mouse **/
  43.     void        DoClick(Point hitPt, short modifierKeys, long when);
  44.     Boolean        HitSamePart(Point pointA, Point pointB);
  45.     
  46.                                     /** Cursor **/
  47.     void        AdjustCursor(Point where, RgnHandle mouseRgn);
  48.  
  49.                                     /** Scrolling **/
  50.     void        ScrollToSelection(void);
  51. };
  52.